package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"zf/api/internal/config"
	"zf/zfrpc/zfrpcclient"
)

type ServiceContext struct {
	Config config.Config
	ZfRpc  zfrpcclient.Zfrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		ZfRpc:  zfrpcclient.NewZfrpc(zrpc.MustNewClient(c.ZfRpc)),
	}
}
